/*
 *  Bullet.h
 *  Rempart
 *
 *  Created by julien BONACHERA on 30/05/11.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */
#ifndef __BULLET
#define __BULLET

class Bullet;
#include <SFML/Graphics.hpp>
#include "RessourcesManager.h"
#include "MapElement.h"
#include "Indexable.h"


extern sf::Mutex globalLock;

class Bullet : public sf::Sprite, public Indexable {

public:
	sf::Clock* localClock;
	Bullet();
	Bullet(const sf::Vector2<float>& target,const sf::Vector2<float>& position, bool isEnemyBullet=false);
	~Bullet();
	void move();
	bool isOutOfMap();
	void setOufOfMap();
	
	sf::Vector2<int> getMapPosition();
	
private:
	
	bool outOfMap;
	sf::Vector2<float>* coeff;
	
};

#endif